newValue += difference;
}
+ let result;
+
// See if the user has moved the mouse enough to trigger
// a drag
let threshold = Gtk.Settings.get_default().gtk_dnd_drag_threshold;
if (Math.abs(stageX - this._dragStartX) < threshold &&
Math.abs(stageY - this._dragStartY) < threshold) {
// no motion? It's a click!
- this.emit('swipe-scroll-end', SwipeScrollResult.CLICK);
+ result = SwipeScrollResult.CLICK;
+ this.emit('swipe-scroll-end', result);
} else {
- let result;
-
if (newValue == this._dragStartValue)
result = SwipeScrollResult.CANCEL;
else
global.stage.disconnect(this._capturedEventId);
this._capturedEventId = 0;
- return true;
+ return result != SwipeScrollResult.CLICK;
case Clutter.EventType.MOTION:
[stageX, stageY] = event.get_coords();